class CreateFotos < ActiveRecord::Migration
  def self.up
    create_table :fotos do |t|
      t.string     :legenda,  :null => false
      t.references :vistoria, :null => false

      t.string     :image_file_name, :image_content_type, :image_file_size
      t.datetime   :image_updated_at

      t.timestamps
    end
    add_index :fotos, :vistoria_id
  end

  def self.down
    drop_table :fotos
  end
end
